package com.fhz.core_lib.dao.database;

import androidx.room.TypeConverter;

import java.util.Date;

/**
* 时间:2021/11/25
* @author msfeng
* 简述: room下不认识的时间类型的转换
*/
public class MyConverters {
    @TypeConverter
    public Date fromTimestamp(Long value){
        return new Date(value);
    }

    @TypeConverter
    public Long dateToTimestamp(Date date){
        return date.getTime();
    }
}
